package com.example.demo.mapper;

import com.example.demo.entity.Instrument;
import com.example.demo.entity.Student;
import com.example.demo.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;
@Mapper
@Repository
public interface InstrumentMapper {

    @Select("SELECT * FROM instrument WHERE id = #{id}")
    Instrument queryInstrumentById(@Param("id") String id);

    @Select("SELECT name FROM instrument WHERE id = #{id}")
    String queryNameById(@Param("id") String id);

    @Select("SELECT * FROM student limit 1000")
    List<Instrument> queryAllInstrument();

}
